package day06;

import java.util.Arrays;
import java.util.Random;

public class MethodDemo {
    public static void main(String[] args) {
/*        say(18);
        System.out.println("哦哦");
        sayHi("张三",18);
        int a=sum(5,6);//sum(5,6)的值就是return后的那个数
        System.out.println(a);//11----模拟对返回值的后续操作
        int m=5,n=6;//
        int b=sum(m,n);//传的是m和n里面的数
        System.out.println(b);

        int[]c=generateArray(100);
        System.out.println("第一个元素的值为:"+c[0]);
        Arrays.sort(c);
        for (int i=0;i<c.length;i++){
            System.out.print(c[i]+"  ");
        }*/
    }

    public static void say(int a){
        System.out.println("我今年"+a+"岁了");
    }
    public static void sayHi(String name,int age){
        System.out.println("我叫"+name+",今年"+age+"岁了");
    }
    public static int sum(int num1,int num2){
        int num=num1+num2;
        return num;
    }
    //生成一个整形数组，并填充随机数据
    public static int[]generateArray(int max){
        Random rand=new Random();
        int[]arr=new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]= rand.nextInt(max+1);
        }
        return arr;
    }
    public static void say(int age,int a){};
    //public static int say(String name,int b);

        }



